<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link th:replace="fragments/dependency :: edit-css">

<title>优铺Admin</title>
</head>

<body class="nav-md">
	<div class="right_col" style="background: #F7F7F7">
		<div class="row">
			<!-- page content -->
			<div class="right_col" role="main">
				<div class="col-md-12 col-sm-12 col-xs-12" style="padding: 0">
					<form class="form-horizontal form-label-left" id="dateForm">
						<div class="x_panel" style="">
							<div class="x_content" style='width: 100px; position: relative'>
								<div style="position: fixed; z-index: 10; width: 100px">
									<a href="#basic" class='btn btn-primary'>1-基本</a> 
									<a href="#money" class='btn btn-primary'>2-费用</a> 
									<a href="#lease" class='btn btn-primary'>3-租约</a> 
									<a href="#property" class='btn btn-primary'>4-物业</a> 
									<a href="#spporting" class='btn btn-primary'>5-配套</a>
									<a href="#management" class='btn btn-primary'>6-经营</a>
									<a href="#position" class='btn btn-primary'>7-位置</a>
									<a href="#img" class='btn btn-primary'>8-图片</a>
									<a href="#anthor" class='btn btn-primary'>9-其它</a> 
									<a href="#prospecting" class='btn btn-primary'>10-实勘</a>
								</div>
							</div>
							<div class="x_content" style='width: 45%; clear: none'>
								<div class="x_content" style='border: 1px dashed #ccc;' id="basic">
									<h2 style="text-align: center">-[1-基本信息]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3" style="padding-bottom: 8px;">
											<span class="required" style='color: red;'>*</span>联系人
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<input type="text" name="linkman" required="required" maxlength="10" class="form-control" placeholder='至多输入10个字'>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">
											<span class="required" style='color: red;'>*</span>性别
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="gender" id="gender1" value="男" required checked data-parsley-multiple="gender" style="position: absolute; opacity: 0;"> 男
												<input type="radio" class="flat" name="gender" id="gender0" value="女" data-parsley-multiple="gender" style="position: absolute; opacity: 0;"> 女 
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">
											<span class="required" style='color: red;'>*</span>电话
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="phone" required="required" maxlength="11" class="form-control">
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">其他联系方式</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="contactWay" maxlength="15" class="form-control" placeholder='至多输入15个字'>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">店铺店招</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px; padding-top: 6px">
											<label> <input type="checkbox" id="signagePlane" name="signage" value="signagePlane" /> <span>平面店招</span></label> 
											<label> <input type="checkbox" id="signageFacade" name="signage" value="signageFacade" /> <span>立面店招</span></label> 
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="money">
									<h2 style="text-align: center">-[2-费用信息]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required"
											style='color: red;'>*</span>月租金
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<label class="col-md-1" style="width:80px"> <input type="checkbox" name="monthlyRentCheck" value="-2" /> <span>面议</span></label>
											<input type="text" name="monthlyRent" required="required" maxlength="30" class="form-control" style="width: 50%; margin-left: 5px">
											<label>元/月</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required"
											style='color: red;'>*</span>日租金
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label class="col-md-1" style="width:80px"> <input type="checkbox" name="dailyRentCheck" value="-2" /> <span>面议</span></label>
											<input type="text" name="dailyRent" required="required" maxlength="30" class="form-control" style="width: 50%; margin-left: 5px">
											<label>元/天/㎡</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">年租金</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label class="col-md-1" style="width:80px"> 
												<input type="checkbox" name="yearlyRentCheck" value="-2" /> <span>面议</span>
											</label>
											<input type="text" name="yearlyRent" required="required" maxlength="30" class="form-control" style="width: 50%; margin-left: 5px">
											<label >万元/年</label>
										</div>
										<label class="control-label col-md-3"style="padding-bottom: 8px;"> 
											<span class="required"style='color: red;'>*</span>转让费
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label class="col-md-1" style="width:60px"> <input type="checkbox" id="transferFeeCheck1" value="-1" /> <span>无</span></label>
											<label class="col-md-1" style="width:70px"> <input type="checkbox" id="transferFeeCheck2" value="-2" /> <span>面议</span></label>
											<input type="text" name="transferFee" required="required" maxlength="30" class="form-control" style="width: 40%; margin-left: 5px">
											<label>万元</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">押金</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="pledgeCash" required="required" maxlength="15" class="form-control" placeholder='至多输入15个字'>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">支付方式</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="payType" required="required" maxlength="15" class="form-control" placeholder='至多输入15个字'>
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="lease">
									<h2 style="text-align: center">-[3-租约信息]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required"
											style='color: red;'>*</span>商铺租赁状态
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="status" id="status0" value="0" required checked data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 租赁中
												<input type="radio" class="flat" name="status" id="status1" value="1" data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 已成交
												<input type="radio" class="flat" name="status" id="status2" value="2" data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 已租出一部分
												<input type="radio" class="flat" name="status" id="status3" value="3" data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 停转租-违建拆除
												<input type="radio" class="flat" name="status" id="status4" value="4" data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 停转租-房东收回
												<input type="radio" class="flat" name="status" id="status5" value="5" data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 停转租-被查封
												<input type="radio" class="flat" name="status" id="status6" value="6" data-parsley-multiple="status" style="position: absolute; opacity: 0;"> 停转租-继续经营
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style='color: red;'>*</span>租售类型
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="rentType" id="rentType0" value="0" required checked data-parsley-multiple="rentType" style="position: absolute; opacity: 0;"> 商铺出租
												<input type="radio" class="flat" name="rentType" id="rentType1" value="1" data-parsley-multiple="rentType" style="position: absolute; opacity: 0;"> 商铺转租/生意转让
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">
											<span class="required" style='color: red;'>*</span>分时出租
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="timeRent" id="timeRent0" value="0" required checked data-parsley-multiple="timeRent" style="position: absolute; opacity: 0;"> 否
												<input type="radio" class="flat" name="timeRent" id="timeRent1" value="1" data-parsley-multiple="timeRent" style="position: absolute; opacity: 0;"> 是-早间出租
												<input type="radio" class="flat" name="timeRent" id="timeRent2" value="2" data-parsley-multiple="timeRent" style="position: absolute; opacity: 0;"> 是-晚间出租
												<input type="radio" class="flat" name="timeRent" id="timeRent3" value="3" data-parsley-multiple="timeRent" style="position: absolute; opacity: 0;"> 是-早、晚出租
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style='color: red;'>*</span>当前租约
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="currLease" required="required" maxlength="15" class="form-control" style="width: 92%" placeholder='至多输入15个字'>
											<label >月</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style='color: red;'>*</span>还剩余
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12"
											style="padding-bottom: 8px;">
											<input type="text" name="residue" required="required" maxlength="30" class="form-control" style="width: 92%" placeholder='至多输入15个字'>
											<label >月</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style='color: red;'>*</span>最长可租约
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="maxLease" required="required" maxlength="30" class="form-control" style="width: 92%" placeholder='至多输入15个字'>
											<label >月</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">续约情况</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px; padding-top: 6px">
											<label> <input type="checkbox" id="leaseCase0" name="leaseCase0" value="0" /> <span>继续使用原租约</span></label> 
											<label> <input type="checkbox" id="leaseCase1" name="leaseCase1" value="1" /> <span>另签一份</span></label> 
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="property">
									<h2 style="text-align: center">-[4-物业信息]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required" style='color: red;'>*</span>商铺类型
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<p>
												<input th:each="type : ${T(com.up.upzl.biz.domain.Shop.Type).values()}" type="radio" class="flat" name="type" th:value="${type}" th:text="${type}" data-parsley-multiple="type" style="position: absolute; opacity: 0;">
											</p>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required" style='color: red;'>*</span>建筑面积
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12"
											style="padding-bottom: 8px;">
											<input type="text" name="buildArea" required="required" maxlength="30" class="form-control" style='width: 90%'>
											<label >平米</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required" style='color: red;'>*</span>使用面积
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12"
											style="padding-bottom: 8px;">
											<input type="text" name="useArea" required="required" maxlength="30" class="form-control" style='width: 90%'>
											<label >平米</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required" style='color: red;'>*</span>是否分隔
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="separate" id="separate0" value="true" required checked data-parsley-multiple="separate" style="position: absolute; opacity: 0;"> 是
												<input type="radio" class="flat" name="separate" id="separate1" value="false" data-parsley-multiple="separate" style="position: absolute; opacity: 0;"> 否
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style='color: red;'>*</span>是否临主干道(两车道以上道路)
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 20px; padding-top: 7px">
											<p>
												<input type="radio" class="flat" name="frontage" id="frontage0" value="true" required checked data-parsley-multiple="frontage" style="position: absolute; opacity: 0;"> 是
												<input type="radio" class="flat" name="frontage" id="frontage1" value="false" data-parsley-multiple="frontage" style="position: absolute; opacity: 0;"> 否
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style='color: red;'>*</span>楼层
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label> <input type="checkbox" id="floor1" name="floor" value="1" /> <span>一层</span></label> 
											<label> <input type="checkbox" id="floor2" name="floor" value="2" /> <span>二层</span></label> 
											<label> <input type="checkbox" id="floor3" name="floor" value="3" /> <span>三层</span></label> 
											<label> <input type="checkbox" id="floor4" name="floor" value="4" /> <span>四层</span></label> 
											<label> <input type="checkbox" id="floorHigh" name="floor" value="99" /> <span>高层</span></label> 
											<label> <input type="checkbox" id="floorUnder" name="floor" value="-1" /> <span>半地下</span></label> 
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											层高
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="floorHeight" required="required"  class="form-control" style='width: 90%'>
											<label>米</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">
											面宽
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="faceWidth" required="required"  class="form-control" style='width: 90%'>
											<label >米</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											进深
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="depth" required="required"  class="form-control" style='width: 64%'>
											<label>米(最多两位小数)</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											朝向
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12"	style="padding-bottom: 8px;">
											<p>
												<input th:each="orientation : ${T(com.up.upzl.biz.domain.Shop.Orientation).values()}" type="radio" class="flat" th:checked="${orientation}" name="orientation"  th:value="${orientation}" th:text="${orientation}" data-parsley-multiple="orientation" style="position: absolute; opacity: 0;">
											</p> 
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> 产权
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input th:each="property : ${T(com.up.upzl.biz.domain.Shop.Property).values()}" type="radio" class="flat" name="property" th:checked="${property}" th:text="${property}" th:value="${property}"  data-parsley-multiple="property" style="position: absolute; opacity: 0;">
											</p>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> 其他产权
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="otherProperty" required="required" class="form-control" placeholder='至多输入20个字'>
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="spporting">
									<h2 style="text-align: center">-[5-配套]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;"> <span class="required" style='color: red;'>*</span>配套
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<label th:each="shopSupporting : ${shopSupportings}"> 
												<input type="checkbox" name="shopSupporting" th:value="${shopSupporting.id}" /> 
												<span th:text="${shopSupporting.name}"></span>
											</label>
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="management">
									<h2 style="text-align: center">-[6-经营情况]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>当前经营
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<div class="col-md-6 col-sm-2 col-xs-12 ">
												<select name="parentManageType" id="parentManageTypeOptions" class="form-control">
													<option value="">请选择</option>
												</select>
											</div>
											<div class="col-md-6 col-sm-2 col-xs-12 ">
												<select name="sonManageType" id="sonManageTypeOptions" class="form-control">
													<option value="">请选择</option>
												</select>
											</div>
										</div>
										<label class="control-label col-md-3"style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>特色标签
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label th:each="shopTag : ${shopTags}"> <input type="checkbox" name="shopTag" th:value="${shopTag.id}" /> 
												<span th:text="${shopTag.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>证照
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<select name="license" class="form-control">
												<option value="">请选择</option>
												<option value="0">不可办照</option>
												<option value="1">可办照</option>
												<option value="2">公司照可过户</option>
												<option value="3">有照可增项</option>
												<option value="4">大照/集体照</option>
												<option value="5">个人照可用</option>
												<option value="6">公司照可用</option>
												<option value="7">个人照可过户</option>
											</select>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>已有证件
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label th:each="shopPaper : ${shopPapers}"> <input type="checkbox" name="shopPaper" th:value="${shopPaper.id}" /> 
												<span th:text="${shopPaper.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>经营状态
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="manageStatus" id="manageStatus0" value="0" required checked data-parsley-multiple="manageStatus" style="position: absolute; opacity: 0;"> 营业中
												<input type="radio" class="flat" name="manageStatus" id="manageStatus1" value="1" data-parsley-multiple="manageStatus" style="position: absolute; opacity: 0;"> 空铺
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>店名
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="shopName" required="required"  class="form-control" placeholder='至多输入20个字'>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">本店优势</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label th:each="shopAdvantage : ${shopAdvantages}"> <input type="checkbox" name="shopAdvantage" th:value="${shopAdvantage.id}" /> 
												<span th:text="${shopAdvantage.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">证件照</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<div>
												<!--用来存放item-->
												<div id="fileList1" class="uploader-list"></div>
												<div id="filePicker1">选择图片（JPG，300K以内）</div>
												<input name="paperImgs" type="hidden">
											</div>
											<label style='color: red'>请放心，您上传的证件照，只用于后台审核，不在前台展示</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">过往经营最大的问题</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label th:each="shopIssue : ${shopIssues}"> 
												<input type="checkbox" name="shopIssue" th:value="${shopIssue.id}" /> 
												<span th:text="${shopIssue.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">品牌情况</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="brandStatus" id="brandStatus0" value="0" required checked data-parsley-multiple="brandStatus" style="position: absolute; opacity: 0;"> 个人
												<input type="radio" class="flat" name="brandStatus" id="brandStatus1" value="1" data-parsley-multiple="brandStatus" style="position: absolute; opacity: 0;"> 加盟
											</p>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">不可经营业态</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<div class="col-md-6 col-sm-2 col-xs-12 ">
												<select name="parentNoType" id="parentNoTypeOptions" class="form-control">
													<option value="">请选择</option>
												</select>
											</div>
											<div class="col-md-6 col-sm-2 col-xs-12 ">
												<select name="sonNoType" id="sonNoTypeOptions" class="form-control">
													<option value="">请选择</option>
												</select>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="x_content" style='width: 45%; clear: none'>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="position">
									<h2 style="text-align: center">-[7-位置信息]-</h2>
									<div class="form-group">
										<div class="col-md-2 col-sm-2 col-xs-12 hide">
											<select name="province" id="provinceOptions" class="form-control"></select>
										</div>
										<div class="col-md-2 col-sm-1 col-xs-12 hide">
											<select name="city" id="cityOptions" class="form-control"></select>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>区域
										</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<select name="area" id="areaOptions" class="form-control">
												
											</select>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>商圈
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<select name="businessArea" id="businessAreaOptions" class="form-control">
												<option value="">请选择</option>
											</select>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>道路
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<select name="road" id="roadOptions" class="form-control">
												<option value="">请选择</option>
											</select>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>详细地址
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="realAddress" required="required" class="form-control">
											<button type="button" onclick="locate()" class="btn btn-success" style="margin-top: 10px; margin-bottom: 10px">定位坐标</button>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>经度
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="positionX" required="required" class="form-control">
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>纬度
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="positionY" required="required" class="form-control">
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;"> 
											<span class="required" style="color: red">*</span>环线
										</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<select class="form-control" name="loopLine" id="loopLineOptions" >
												<option value="0">不限</option>
												<option value="1">2环内</option>
												<option value="2">2-3环</option>
												<option value="3">3-4环</option>
												<option value="4">4-5环</option>
												<option value="5">5环外</option>
											</select>
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;' id="img">
									<h2 style="text-align: center">-[8-上传图片]-</h2>
									<div>
										<!--用来存放item-->
										<div id="fileList" class="uploader-list"></div>
										<div id="filePicker">选择图片（JPG，300K以内）</div>
										<input name="imgs" type="hidden">
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="anthor">
									<h2 style="text-align: center">-[9-其他信息]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">道路阻隔</label>
										<div class="col-md-8" style="padding-bottom: 8px; padding-top: 10px">
											<label th:each="shopObstruct : ${shopObstructs}"> 
												<input type="checkbox" name="shopRoadObstruct" th:value="${shopObstruct.id}" /> 
												<span th:text="${shopObstruct.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">路宽</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="roadWidth" required="required" class="form-control" style="width: 90%">
											<label>米</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">装修情况</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<p>
												<input type="radio" class="flat" name="fit" id="fit0" value="0" required checked data-parsley-multiple="fit" style="position: absolute; opacity: 0;"> 精装
												<input type="radio" class="flat" name="fit" id="fit1" value="1" data-parsley-multiple="fit" style="position: absolute; opacity: 0;"> 简装
												<input type="radio" class="flat" name="fit" id="fit2" value="2" data-parsley-multiple="fit" style="position: absolute; opacity: 0;"> 毛坯/清水房
											</p>
										</div>

										<label class="control-label col-md-3" style="padding-bottom: 8px;">介绍</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px">
											<textarea id="introduce" required="required"
												class="form-control" style="height: 200px" name="introduce"
												data-parsley-trigger="keyup" data-parsley-minlength="20"
												data-parsley-maxlength="100"
												data-parsley-minlength-message="Come on! You need to enter at least a 20 caracters long comment.."
												data-parsley-validation-threshold="10"></textarea>
										</div>
									</div>
								</div>
								<div class="x_content" style='border: 1px dashed #ccc;'
									id="prospecting">
									<h2 style="text-align: center">-[10-实勘信息]-</h2>
									<div class="form-group">
										<label class="control-label col-md-3" style="padding-bottom: 8px;">店前人流</label>
										<div class="col-md-8" style="padding-bottom: 8px;">
											<input type="text" name="personFlow" required="required" class="form-control" style='width: 90%'>
											<label>人</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">店前阻隔</label>
										<div class="col-md-8" style="padding-bottom: 8px; padding-top: 10px">
											<label th:each="shopObstruct : ${shopObstructs}"> 
												<input type="checkbox" name="shopObstruct" th:value="${shopObstruct.id}" /> 
												<span th:text="${shopObstruct.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">绿化带/隔离带阻隔距离</label>
										<div class="col-md-8" style="padding-bottom: 8px; padding-top: 12px">
											<label class="col-md-1" style="width:80px"> <input type="checkbox" name="distanceCheck" value="-1" /> <span>无</span></label>
											<input type="text" name="distance" required="required" maxlength="30" class="form-control" style="width: 50%; margin-left: 5px">
											<label>米</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">遮挡程度</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<select name="keepOut" class="form-control" style="width: 90%">
												<option value="">请选择</option>
												<option value="0">0</option>
												<option value="20">20</option>
												<option value="40">40</option>
												<option value="60">60</option>
											</select> 
											<label>%</label>
										</div>
										
										<label class="control-label col-md-3" style="padding-bottom: 8px;">经营时长</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="manageTime" required="required" class="form-control" style="width: 65%">
											<label>年(最多一位小数)</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">空转转让费</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="spinFee" required="required"
												 class="form-control" style='width: 90%'>
											<label>万元</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">上一手转让费</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="lastFee" required="required" class="form-control" style='width: 90%'>
											<label>万元</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">上一家投资额</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="lastAmount" required="required" class="form-control" style='width: 90%'>
											<label>万元</label>
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">转让内容</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label th:each="shopTransfer : ${shopTransfers}"> 
												<input type="checkbox" name="shopTransfer" th:value="${shopTransfer.id}" /> 
												<span th:text="${shopTransfer.name}"></span>
											</label>
										</div>
										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">最大电容量</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<label class="col-md-1" style="width:100px"> <input type="checkbox" value="-1" /> <span>可扩容</span></label>
											 <input type="text" name="maxMeasure" required="required"  class="form-control" style="width: 60%">
										</div>
										<label class="control-label col-md-3" style="padding-bottom: 8px;">营业额</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<div class="radio">
												<p>
													<input type="radio" class="flat" name="turnoverUnit" id="turnoverUnit0" value="0" required checked data-parsley-multiple="turnoverUnit" style="position: absolute; opacity: 0;">元/天 
													<input type="radio" class="flat" name="turnoverUnit" id="turnoverUnit1" value="1" data-parsley-multiple="turnoverUnit" style="position: absolute; opacity: 0;"> 元/月
													<input type="text" name="turnover" required="required" class="form-control" style='width: 56%'>
												</p>
											</div>
										</div>

										<label class="control-label col-md-3"
											style="padding-bottom: 8px;">客单价</label>
										<div class="col-md-8 col-sm-2 col-xs-12" style="padding-bottom: 8px;">
											<input type="text" name="customerPrice" required="required" class="form-control" style="width: 75%">
											<label>元(整数)</label>
										</div>
									</div>
								</div>
								<div class="x_content">
									<div style="text-align: center">
										<button type="submit" class="btn btn-success" style="margin-top: 10px; margin-bottom: 10px">提交</button>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

	<div th:replace="fragments/dependency :: edit-js"></div>
	<script src="/dic/area.js?v20171010"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=47vEMrUPXkGWul3APowwKZ1w"></script>
	<script type="text/javascript">
		function locate() {
			var area = $('input[name="address"]').val()
			area = area ? area : $('select[name="province"]').text()
			adminLayer.ifream({
				title : '获取坐标',
				content : '/baiduMap/locate?area=' + area,
				area : [ '75%', '75%' ]
			})
		}

		function locateCallback(x, y) {
			$('input[name="positionX"]').val(x)
			$('input[name="positionY"]').val(y)
		}

		$(function() {
			var areaParam 
			var cityParam = 36
			
			
			
		    $("input[name='monthlyRent']").blur(function() {
				var monthlyRent= $(this).val();
			    if(monthlyRent){
			    	$("input[name='monthlyRentCheck']").attr('disabled',true);
			    	$("input[name='dailyRentCheck']").attr('disabled',true);
			    	$("input[name='yearlyRentCheck']").attr('disabled',true);
			    	var buildArea=$('input[name="buildArea"]').val();
			    	if(buildArea){
			    		$('input[name="dailyRent"]').val(new Number(monthlyRent*12/365/buildArea).toFixed(2));
				    	$('input[name="yearlyRent"]').val(new Number(monthlyRent*12/10000).toFixed(2));
			    	}else{
			    		$('input[name="buildArea"]').focus();
			    		$('input[name="dailyRent"]').val("");
				    	$('input[name="yearlyRent"]').val("");
			    	}
			    }else{
			    	$('input[name="dailyRent"]').val("");
			    	$('input[name="yearlyRent"]').val("");
			    }
			});
			
			
		    $("input[name='phone']").blur(function() {
				var phone= $(this).val();
			    if(phone){
					$.getJSON('/shop/validShopByPhone?phone=' + phone+"&shopId=", function(data) {
					if(data==false){
						layer.msg('已有该商铺，请换个商铺录入', {time:3000}); 
					}
			       }
					)
			    }
			});			
			
		    $("input[name='buildArea']").blur(function() {
				var buildArea= $(this).val();
				if(buildArea){
					var monthlyRent=$('input[name="monthlyRent"]').val();
			    	if(monthlyRent){
			    		$('input[name="dailyRent"]').val(new Number(monthlyRent*12/365/buildArea).toFixed(2));
				    	$('input[name="yearlyRent"]').val(new Number(monthlyRent*12/10000).toFixed(2));
			    	}else{
			    		$('input[name="dailyRent"]').val("");
				    	$('input[name="yearlyRent"]').val("");
			    	}
				}else{
					$('input[name="dailyRent"]').val("");
			    	$('input[name="yearlyRent"]').val("");
				}
				

			});
			
		  //  $("input[name='monthlyRent']").click(function() {
		   // 	$("input[name='monthlyRentCheck']").attr('disabled',true);
		   // 	$("input[name='dailyRentCheck']").attr('disabled',true);
		   // 	$("input[name='yearlyRentCheck']").attr('disabled',true);
			//	$("input[name='monthlyRent']").attr('disabled',false);
		   // 	$("input[name='dailyRent']").attr('disabled',false);
		  //  	$("input[name='yearlyRent']").attr('disabled',false);
		//	});
			
			$('input[name="monthlyRentCheck"]').on('ifChecked', function(event){ 
				$("input[name='monthlyRent']").attr('disabled',true);
		    	$("input[name='dailyRent']").attr('disabled',true);
		    	$("input[name='yearlyRent']").attr('disabled',true);
		    	$('input[name="dailyRentCheck"]').iCheck('check');
		    	$('input[name="yearlyRentCheck"]').iCheck('check');
				$("input[name='monthlyRent']").val('');
		    	$("input[name='dailyRent']").val('');
		    	$("input[name='yearlyRent']").val('');
			});
			
			//$('input[name="monthlyRentCheck"]').on('ifClicked', function(event){ 
			//	alert("===");
			//	$("input[name='monthlyRent']").attr('disabled',true);
		    //	$("input[name='dailyRent']").attr('disabled',true);
		    //	$("input[name='yearlyRent']").attr('disabled',true);
		    //	$('input[name="dailyRentCheck"]').iCheck('check');
		    //	$('input[name="yearlyRentCheck"]').iCheck('check');
			//	$("input[name='monthlyRent']").val('');
		    //	$("input[name='dailyRent']").val('');
		    //	$("input[name='yearlyRent']").val('');
			//});
			
			$('input[name="monthlyRentCheck"]').on('ifUnchecked', function(event){ 
				$("input[name='monthlyRent']").attr('disabled',false);
		    	$("input[name='dailyRent']").attr('disabled',false);
		    	$("input[name='yearlyRent']").attr('disabled',false);
		    	$('input[name="dailyRentCheck"]').iCheck('uncheck');
		    	$('input[name="yearlyRentCheck"]').iCheck('uncheck');
			});
			
			
			renderCityOptions('cityOptions',cityParam)
			if(cityParam>0){
				renderAreaOptions('areaOptions',areaParam,cityParam)
			}else{
				$("#areaOptions").append('<option value="">请选择</option>')
			}
			
			$("#cityOptions").change(function(){
				var cityId = $("#cityOptions").val();
				$("#areaOptions").empty();
				if(cityId==''){
					$("#areaOptions").append('<option value="">请选择</option>')
				}else{
					renderAreaOptions('areaOptions',areaParam,cityId)
				}
			})
		
			$("select[name='area']").change(function() {
				var area = $(this).val();
				if($(this).val()) {
					$.getJSON('/businessArea/getByAreaId?area=' + area, function(data) {
						var option = '<option value>请选择</option>';
						if(data.length > 0) {
							$.each(data, function(index, temp) {
								option += "<option value='" + temp.id + "'>" + temp.name + "</option>"
							});
						}
						$("select[name=businessArea]").html(option);
					});
				} else {
					$("select[name=businessArea]").html('<option value>请选择</option>');
				}
			});
			$("select[name='area']").change(function() {
				var area = $(this).val();
				if($(this).val()) {
					$.getJSON('/roadArea/getByAreaId?area=' + area, function(data) {
						var option = '<option value="">请选择</option>';
						if(data.length > 0) {
							$.each(data, function(index, temp) {
								option += "<option value='" + temp.id + "'>" + temp.name + "</option>"
							});
						}
						$("select[name=road]").html(option);
					});
				} else {
					$("select[name=road]").html('<option value>请选择</option>');
				}
			});
			$.getJSON('/shopBusinessType/findParent', function(data) {
				var option = '<option value>请选择</option>';
				if(data.length > 0) {
					$.each(data, function(index, temp) {
						option += "<option value='" + temp.id + "'>" + temp.name + "</option>"
					});
				}
				$("select[name=parentManageType]").html(option);
				$("select[name=parentNoType]").html(option);
			});
			
			$("select[name='parentManageType']").change(function() {
				var pid = $(this).val();
				if($(this).val()) {
					$.getJSON('/shopBusinessType/findSon?pid=' + pid, function(data) {
						var option = '<option value>请选择</option>';
						if(data.length > 0) {
							$.each(data, function(index, temp) {
								option += "<option value='" + temp.id + "'>" + temp.name + "</option>"
							});
						}
						$("select[name=sonManageType]").html(option);
					});
				} else {
					$("select[name=sonManageType]").html('<option value>请选择</option>');
				}
			});
			
			$("select[name='parentNoType']").change(function() {
				var pid = $(this).val();
				if($(this).val()) {
					$.getJSON('/shopBusinessType/findSon?pid=' + pid, function(data) {
						var option = '<option value>请选择</option>';
						if(data.length > 0) {
							$.each(data, function(index, temp) {
								option += "<option value='" + temp.id + "'>" + temp.name + "</option>"
							});
						}
						$("select[name=sonNoType]").html(option);
					});
				} else {
					$("select[name=sonNoType]").html('<option value>请选择</option>');
				}
			});
			
			var uploader = WebUploader.create({
				// 选完文件后，是否自动上传。
				auto : true,
				// swf文件路径
				swf : '/js/Uploader.swf',
				// 文件接收服务端。
				server : 'https://static.youpuchina.com/ueditor/jsp/controller.jsp?action=uploadimage&watermark=true',
				// 选择文件的按钮。可选。
				// 内部根据当前运行是创建，可能是input元素，也可能是flash.
				pick : '#filePicker',
				// 只允许选择图片文件。
				accept : {
					title : 'Images',
					extensions : 'jpg',
					mimeTypes : 'image/*'
				},
				fileSingleSizeLimit : 300 * 1024
			});

			uploader.onError = function(code) {
				if (code == 'Q_TYPE_DENIED') {
					layer.msg('图片类型错误', {
						icon : 2
					});
				} else if (code == 'F_EXCEED_SIZE') {
					layer.msg('图片的大小超过限制', {
						icon : 2
					});
				}
			};

			uploader.on('fileQueued',function(file) {
				var $li = $('<div id="' + file.id + '" class="file-item thumbnail">'
						+ '<button type="button" class="closeImg" style="position: absolute; bottom: 8px;" i="">删除</button>'
						+ '<img>'
						+ '<div class="info">'
						+ file.name + '</div>' + '</div>'), $img = $li
						.find('img');
				// $list为容器jQuery实例
				$('#fileList').append($li);
				// 创建缩略图
				// 如果为非图片文件，可以不用调用此方法。
				// thumbnailWidth x thumbnailHeight 为 100 x 100
				uploader.makeThumb(file, function(error, src) {
					if (error) {
						$img.replaceWith('<span>不能预览</span>');
						return;
					}

					$img.attr('src', src);
				}, 100, 100);
			});

			// 文件上传过程中创建进度条实时显示。
			uploader.on('uploadProgress', function(file, percentage) {
				var $li = $('#' + file.id), $percent = $li.find('.progress span');
				// 避免重复创建
				if (!$percent.length) {
					$percent = $('<p class="progress"><span></span></p>').appendTo($li).find('span');
				}

				$percent.css('width', percentage * 100 + '%');
			});

			// 文件上传成功，给item添加成功class, 用样式标记上传成功。
			uploader.on('uploadSuccess', function(file, result) {
				$('#' + file.id).addClass('upload-state-done');
				$('#' + file.id).find(".closeImg").attr('i', result.url);
				var imgs = $('input[name="imgs"]').val()
				if (imgs) {
					$('input[name="imgs"]').val(
							$('input[name="imgs"]').val() + ',' + result.url)
				} else {
					$('input[name="imgs"]').val(result.url)
				}
			});

			// 文件上传失败，显示上传出错。
			uploader.on('uploadError', function(file) {
				var $li = $('#' + file.id), $error = $li.find('div.error');
				// 避免重复创建
				if (!$error.length) {
					$error = $('<div class="error"></div>').appendTo($li);
				}
				$error.text('上传失败');
			});

			// 完成上传完了，成功或者失败，先删除进度条。
			uploader.on('uploadComplete', function(file) {
				$('#' + file.id).find('.progress').remove();
			});
			//-----------------上传图片------------------------
			var uploader1 = WebUploader.create({
				// 选完文件后，是否自动上传。
				auto : true,
				// swf文件路径
				swf : '/js/Uploader.swf',
				// 文件接收服务端。
				server : 'https://static.youpuchina.com/ueditor/jsp/controller.jsp?action=uploadimage&watermark=true',
				// 选择文件的按钮。可选。
				// 内部根据当前运行是创建，可能是input元素，也可能是flash.
				pick : '#filePicker1',
				// 只允许选择图片文件。
				accept : {
					title : 'Images',
					extensions : 'jpg',
					mimeTypes : 'image/*'
				},
				fileSingleSizeLimit : 300 * 1024
			});

			uploader1.onError = function(code) {
				if (code == 'Q_TYPE_DENIED') {
					layer.msg('图片类型错误', {
						icon : 2
					});
				} else if (code == 'F_EXCEED_SIZE') {
					layer.msg('图片的大小超过限制', {
						icon : 2
					});
				}
			};

			uploader1.on('fileQueued',function(file) {
				var $li = $('<div id="' + file.id + '" class="file-item thumbnail">'
						+ '<button type="button" class="closeImg" style="position: absolute; bottom: 8px;" i="">删除</button>'
						+ '<img>'
						+ '<div class="info">'
						+ file.name + '</div>' + '</div>'), $img = $li
						.find('img');
				// $list为容器jQuery实例
				$('#fileList1').append($li);
				// 创建缩略图
				// 如果为非图片文件，可以不用调用此方法。
				// thumbnailWidth x thumbnailHeight 为 100 x 100
				uploader.makeThumb(file, function(error, src) {
					if (error) {
						$img.replaceWith('<span>不能预览</span>');
						return;
					}

					$img.attr('src', src);
				}, 100, 100);
			});

			// 文件上传过程中创建进度条实时显示。
			uploader.on('uploadProgress', function(file, percentage) {
				var $li = $('#' + file.id), $percent = $li.find('.progress span');
				// 避免重复创建
				if (!$percent.length) {
					$percent = $('<p class="progress"><span></span></p>').appendTo($li).find('span');
				}

				$percent.css('width', percentage * 100 + '%');
			});

			// 文件上传成功，给item添加成功class, 用样式标记上传成功。
			uploader.on('uploadSuccess', function(file, result) {
				$('#' + file.id).addClass('upload-state-done');
				$('#' + file.id).find(".closeImg").attr('i', result.url);
				var imgs1 = $('input[name="imgs1"]').val()
				if (imgs1) {
					$('input[name="imgs1"]').val(
							$('input[name="imgs1"]').val() + ',' + result.url)
				} else {
					$('input[name="imgs1"]').val(result.url)
				}
			});

			// 文件上传失败，显示上传出错。
			uploader.on('uploadError', function(file) {
				var $li = $('#' + file.id), $error = $li.find('div.error');
				// 避免重复创建
				if (!$error.length) {
					$error = $('<div class="error"></div>').appendTo($li);
				}
				$error.text('上传失败');
			});

			// 完成上传完了，成功或者失败，先删除进度条。
			uploader.on('uploadComplete', function(file) {
				$('#' + file.id).find('.progress').remove();
			});
			//------------------end--------------------------

			$('input[type="checkbox"]').iCheck({
				checkboxClass : 'icheckbox_flat-green'
			});

			var shop = {}
			$("#dateForm").validator({
				rules : {
					number1 : [ /^\d+(\.?\d{1})?$/, "请填写有效的数字（保留一位）" ],
					number2 : [ /^\d+(\.?\d{2})?$/, "请填写有效的数字（保留两位）" ],
				},
				fields : {
					linkman : 'required',
					phone : 'required',
					currLease : 'required',
					residue : 'required',
					maxLease : 'required',
					buildArea : 'required;number1',
					useArea : 'required;number1',
					floor : 'checked(1~);',
					shopSupporting : 'checked(1~);',
					maxLease : 'required',
					parentManageType : 'required',
					sonManageType : 'required',
					shopTag : 'checked(1~);',
					license : 'required',
					shopPaper : 'checked(1~);',
					shopName : 'required',
					city : 'required',
					area : 'required',
					road:'required',
					businessArea : 'required',
					realAddress : 'required',
					positionX : 'required',
					positionY : 'required',
					loopLine : 'required',
					//imgs : 'required',
				},
				valid : function(form) {
					shop.linkman = $('input[name="linkman"]').val()
					shop.gender = $("input[name=gender]:checked").val();
					shop.phone = $('input[name="phone"]').val()
					shop.contactWay = $('input[name="contactWay"]').val()
					shop.signagePlane = $('input[value="signagePlane"]').prop('checked');
					shop.signageFacade = $('input[value="signageFacade"]').prop('checked');
					var yearlyRentFlag = $('name[value="yearlyRentCheck"]').prop('checked');
					if(yearlyRentFlag){
						shop.yearlyRent = -2
					}else{
						shop.yearlyRent = $('input[name="yearlyRent"]').val()
					}
					var monthlyRentFlag = $('input[name="monthlyRentCheck"]').prop('checked');
					if(monthlyRentFlag){
						shop.monthlyRent = -2
					}else{
						shop.monthlyRent = $('input[name="monthlyRent"]').val()
					}
					var dailyRentFlag = $('input[name="dailyRentCheck"]').prop('checked');
					if(dailyRentFlag){
						shop.dailyRent = -2
					}else{
						shop.dailyRent = $('input[name="dailyRent"]').val()
					}
					if($('input[name="transferFeeCheck1"]').prop('checked')){
						shop.transferFee = -1
					}else if($('input[name="transferFeeCheck2"]').prop('checked')){
						shop.transferFee = -2
					}else{
						shop.transferFee = $('input[name="transferFee"]').val()
					}
					shop.pledgeCash = $('input[name="pledgeCash"]').val()
					shop.payType = $('input[name="payType"]').val()
					shop.status = $("input[name=status]:checked").val();
					shop.rentType = $("input[name=rentType]:checked").val();
					shop.timeRent = $("input[name=timeRent]:checked").val();
					shop.currLease = $('input[name="currLease"]').val()
					shop.residue = $('input[name="residue"]').val()
					shop.maxLease = $('input[name="maxLease"]').val()
					shop.leaseCase0 = $('input[name="leaseCase0"]').prop('checked');
					shop.leaseCase1 = $('input[name="leaseCase1"]').prop('checked');
					shop.type = $('input[name="type"]').val()
					shop.buildArea = $('input[name="buildArea"]').val()
					shop.useArea = $('input[name="useArea"]').val()
					shop.separate = $("input[name=separate]:checked").val();
					
					if($('input[name=frontage]').val() != null){
					shop.frontage = $("input[name=frontage]:checked").val();
					}
					shop.floor1 = $("#floor1").prop('checked');
					shop.floor2 = $("#floor2").prop('checked');
					shop.floor3 = $("#floor3").prop('checked');
					shop.floor4 = $("#floor4").prop('checked');
					shop.floorHigh = $("#floorHigh").prop('checked');
					shop.floorUnder = $("#floorUnder").prop('checked');
					shop.floorHeight = $('input[name="floorHeight"]').val()
					shop.faceWidth = $('input[name="faceWidth"]').val()
					shop.depth = $('input[name="depth"]').val()
					
					if($('select[name="parentManageType"]').val()){
						shop.parentManageType = {}
						shop.parentManageType.id = $('select[name="parentManageType"]').val()
						shop.parentManageType.name = $('select[name="parentManageType"]').find('option:selected').text()
					}
					if($('select[name="sonManageType"]').val()){
						shop.sonManageType = {}
						shop.sonManageType.id = $('select[name="sonManageType"]').val()
						shop.sonManageType.name = $('select[name="sonManageType"]').find('option:selected').text()
					}
					if($('select[name="parentNoType"]').val()){
						shop.parentNoType = {}
						shop.parentNoType.id = $('select[name="parentNoType"]').val()
						shop.parentNoType.name = $('select[name="parentNoType"]').find('option:selected').text()
					}
					if($('select[name="sonNoType"]').val()){
						shop.sonNoType = {}
						shop.sonNoType.id = $('select[name="sonNoType"]').val()
						shop.sonNoType.name = $('select[name="sonNoType"]').find('option:selected').text()
					}
					shop.license = $('select[name="license"]').val()
					shop.manageStatus = $('input[name="manageStatus"]:checked').val()
					shop.shopName = $('input[name="shopName"]').val()
					shop.brandStatus = $('input[name="brandStatus"]:checked').val();
					shop.city = {}
					shop.city.id = 36
					if($('select[name="area"]').val()){
						shop.area = {}
						shop.area.id = $('select[name="area"]').val()
						shop.area.name = $('select[name="area"]').find('option:selected').text()
					}
					if($('select[name="businessArea"]').val()){
						shop.businessArea = {}
						shop.businessArea.id = $('select[name="businessArea"]').val()
						shop.businessArea.name = $('select[name="businessArea"]').find('option:selected').text()
					}
					if($('select[name="road"]').val()){
						shop.road = {}
						shop.road.id = $('select[name="road"]').val()
						shop.road.name = $('select[name="road"]').find('option:selected').text()
					}
					shop.realAddress = $('input[name="realAddress"]').val()
					shop.positionX = $('input[name="positionX"]').val()
					shop.positionY = $('input[name="positionY"]').val()
					shop.loopLine = $('select[name="loopLine"]').val()
					if($('input[name="orientation"]').val() != null){
						shop.orientation = $('input[name="orientation"]:checked').val()
						//alert($('input[name="orientation"]:checked').val())
						
					}
					
					//$('input[name="shopTag"]:checked')
					if($('input[name="property"]').val() != null){
						shop.property =$('input[name="property"]:checked').val()
					}
					shop.otherProperty =$('input[name="otherProperty"]').val()
					//shop.road = $('input[name="road"]').val()
					shop.roadWidth = $('input[name="roadWidth"]').val()
					shop.fit = $('input[name="fit"]').val()
					shop.introduce = $('#introduce').val()
					shop.personFlow = $('input[name="personFlow"]').val()
					shop.distance = $('input[name="distance"]').val()
					shop.keepOut = $('select[name="keepOut"]').val()
					shop.manageTime = $('input[name="manageTime"]').val()
					shop.spinFee = $('input[name="spinFee"]').val()
					shop.lastFee = $('input[name="lastFee"]').val()
					shop.lastAmount = $('input[name="lastAmount"]').val()
					shop.maxMeasure = $('input[name="maxMeasure"]').val()
					shop.turnoverUnit = $('input[name="turnoverUnit"]').val()
					shop.submitStatus = $('input[name="submitStatus"]').val()
					shop.turnover = $('input[name="turnover"]').val()
					shop.customerPrice = $('input[name="customerPrice"]').val()
					shop.imgs = $('input[name="imgs"]').val()
					shop.paperImgs = $('input[name="paperImgs"]').val()
					
					var shopTags = []
					$.each($('input[name="shopTag"]:checked'), function(index, node) {
						shopTags.push({
							id : $(node).val()
						})
					})
					shop.shopTags = shopTags
					var shopSupportings = []
					$.each($('input[name="shopSupporting"]:checked'), function(index, node) {
						shopSupportings.push({
							id : $(node).val()
						})
					})
					shop.shopSupportings = shopSupportings
					var shopPapers = []
					$.each($('input[name="shopPaper"]:checked'), function(index, node) {
						shopPapers.push({
							id : $(node).val()
						})
					})
					shop.shopPapers = shopPapers
					var shopAdvantages = []
					$.each($('input[name="shopAdvantage"]:checked'), function(index, node) {
						shopAdvantages.push({
							id : $(node).val()
						})
					})
					shop.shopAdvantages=shopAdvantages
					var shopIssues = []
					$.each($('input[name="shopIssue"]:checked'), function(index, node) {
						shopIssues.push({
							id : $(node).val()
						})
					})
					shop.shopIssues=shopIssues
					var shopObstructs = []
					$.each($('input[name="shopObstruct"]:checked'), function(index, node) {
						shopObstructs.push({
							id : $(node).val()
						})
					})
					shop.shopObstructs=shopObstructs
					var shopTransfers = []
					$.each($('input[name="shopTransfer"]:checked'), function(index, node) {
						shopTransfers.push({
							id : $(node).val()
						})
					})
					shop.shopTransfers=shopTransfers
					$.ajax({
						url : '/shop/add',
						type : "POST",
						dataType : "json",
						contentType : "application/json",
						data : JSON.stringify(shop),
						success : function(data) {
							if (data.Type == '200') {
								adminLayer.alert({
									content : '添加成功',
									yes : function() {
										var index = parent.layer.getFrameIndex(window.name);
										parent.layer.close(index);
										window.parent.location.reload();
									}
								});
							} else if (data.Type == '201') {
								adminLayer.alert({
									content : data.Msg
								});
							}else if (data.Type == '300') {
								$('input[name="phone"]').focus();
									adminLayer.alert({
										content : "已有该商铺，请换个商铺录入"
									});
							} else {
								adminLayer.alert({
									content : '添加失败',
								});
							}
						}
					});
				}
			});

			$("div").on("click", ".closeImg", function() {
				var src = $(this).attr("i");
				var src1 = ',' + src;
				var src2 = src + ',';
				var imgList = $('input[name="imgs"]').val();
				if (imgList.indexOf(src1) > -1) {
					var list = imgList.replace(src1, '');
				} else if (imgList.indexOf(src2) > -1) {
					var list = imgList.replace(src2, '');
				} else {
					var list = imgList.replace(src, '');
				}
				$('input[name="imgs"]').val(list);
				$(this).parent("div").remove();
			});
		})
	</script>
</body>
</html>
